.class public Ljavax/microedition/lcdui/Graphics;
.super Ljava/lang/Object;
.source "Graphics.java"


# static fields
.field public static final BASELINE:I = 0x40

.field public static final BOTTOM:I = 0x20

.field public static final DOTTED:I = 0x1

.field public static final HCENTER:I = 0x1

.field public static final LEFT:I = 0x4

.field public static final RIGHT:I = 0x8

.field public static final SOLID:I = 0x0

.field public static final TOP:I = 0x10

.field public static final VCENTER:I = 0x2


# instance fields
.field strokeStyle:I

.field translateX:I

.field translateY:I


# direct methods
.method public constructor <init>()V
    .locals 1

    .prologue
    const/4 v0, 0x0

    .line 31
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 50
    iput v0, p0, Ljavax/microedition/lcdui/Graphics;->strokeStyle:I

    .line 52
    iput v0, p0, Ljavax/microedition/lcdui/Graphics;->translateX:I

    .line 54
    iput v0, p0, Ljavax/microedition/lcdui/Graphics;->translateY:I

    return-void
.end method

.method private implementationError()V
    .locals 3

    .prologue
    .line 241
    :try_start_0
    new-instance v1, Ljava/lang/RuntimeException;

    const-string v2, "Must be implemented in DisplayGraphics"

    invoke-direct {v1, v2}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;)V

    throw v1
    :try_end_0
    .catch Ljava/lang/RuntimeException; {:try_start_0 .. :try_end_0} :catch_0

    .line 242
    :catch_0
    move-exception v1

    move-object v0, v1

    .line 243
    .local v0, ex:Ljava/lang/RuntimeException;
    invoke-virtual {v0}, Ljava/lang/RuntimeException;->printStackTrace()V

    .line 245
    return-void
.end method


# virtual methods
.method public clipRect(IIII)V
    .locals 0
    .parameter "x"
    .parameter "y"
    .parameter "width"
    .parameter "height"

    .prologue
    .line 57
    invoke-direct {p0}, Ljavax/microedition/lcdui/Graphics;->implementationError()V

    .line 58
    return-void
.end method

.method public copyArea(IIIIIII)V
    .locals 0
    .parameter "x_src"
    .parameter "y_src"
    .parameter "width"
    .parameter "height"
    .parameter "x_dest"
    .parameter "y_dest"
    .parameter "anchor"

    .prologue
    .line 230
    invoke-direct {p0}, Ljavax/microedition/lcdui/Graphics;->implementationError()V

    .line 231
    return-void
.end method

.method public drawArc(IIIIII)V
    .locals 0
    .parameter "x"
    .parameter "y"
    .parameter "width"
    .parameter "height"
    .parameter "startAngle"
    .parameter "arcAngle"

    .prologue
    .line 61
    invoke-direct {p0}, Ljavax/microedition/lcdui/Graphics;->implementationError()V

    .line 62
    return-void
.end method

.method public drawChar(CIII)V
    .locals 2
    .parameter "character"
    .parameter "x"
    .parameter "y"
    .parameter "anchor"

    .prologue
    .line 65
    const/4 v1, 0x1

    new-array v0, v1, [C

    .line 66
    .local v0, carr:[C
    const/4 v1, 0x0

    aput-char p1, v0, v1

    .line 67
    new-instance v1, Ljava/lang/String;

    invoke-direct {v1, v0}, Ljava/lang/String;-><init>([C)V

    invoke-virtual {p0, v1, p2, p3, p4}, Ljavax/microedition/lcdui/Graphics;->drawString(Ljava/lang/String;III)V

    .line 68
    return-void
.end method

.method public drawChars([CIIIII)V
    .locals 1
    .parameter "data"
    .parameter "offset"
    .parameter "length"
    .parameter "x"
    .parameter "y"
    .parameter "anchor"

    .prologue
    .line 71
    new-instance v0, Ljava/lang/String;

    invoke-direct {v0, p1, p2, p3}, Ljava/lang/String;-><init>([CII)V

    invoke-virtual {p0, v0, p4, p5, p6}, Ljavax/microedition/lcdui/Graphics;->drawString(Ljava/lang/String;III)V

    .line 72
    return-void
.end method

.method public drawImage(Ljavax/microedition/lcdui/Image;III)V
    .locals 0
    .parameter "img"
    .parameter "x"
    .parameter "y"
    .parameter "anchor"

    .prologue
    .line 75
    invoke-direct {p0}, Ljavax/microedition/lcdui/Graphics;->implementationError()V

    .line 76
    return-void
.end method

.method public drawLine(IIII)V
    .locals 0
    .parameter "x1"
    .parameter "y1"
    .parameter "x2"
    .parameter "y2"

    .prologue
    .line 79
    invoke-direct {p0}, Ljavax/microedition/lcdui/Graphics;->implementationError()V

    .line 80
    return-void
.end method

.method public drawRGB([IIIIIIIZ)V
    .locals 0
    .parameter "rgbData"
    .parameter "offset"
    .parameter "scanlength"
    .parameter "x"
    .parameter "y"
    .parameter "width"
    .parameter "height"
    .parameter "processAlpha"

    .prologue
    .line 221
    invoke-direct {p0}, Ljavax/microedition/lcdui/Graphics;->implementationError()V

    .line 222
    return-void
.end method

.method public drawRect(IIII)V
    .locals 0
    .parameter "x"
    .parameter "y"
    .parameter "width"
    .parameter "height"

    .prologue
    .line 83
    invoke-direct {p0}, Ljavax/microedition/lcdui/Graphics;->implementationError()V

    .line 84
    return-void
.end method

.method public drawRegion(Ljavax/microedition/lcdui/Image;IIIIIIII)V
    .locals 0
    .parameter "src"
    .parameter "x_src"
    .parameter "y_src"
    .parameter "width"
    .parameter "height"
    .parameter "transform"
    .parameter "x_dst"
    .parameter "y_dst"
    .parameter "anchor"

    .prologue
    .line 216
    invoke-direct {p0}, Ljavax/microedition/lcdui/Graphics;->implementationError()V

    .line 217
    return-void
.end method

.method public drawRoundRect(IIIIII)V
    .locals 0
    .parameter "x"
    .parameter "y"
    .parameter "width"
    .parameter "height"
    .parameter "arcWidth"
    .parameter "arcHeight"

    .prologue
    .line 87
    invoke-direct {p0}, Ljavax/microedition/lcdui/Graphics;->implementationError()V

    .line 88
    return-void
.end method

.method public drawString(Ljava/lang/String;III)V
    .locals 0
    .parameter "str"
    .parameter "x"
    .parameter "y"
    .parameter "anchor"

    .prologue
    .line 91
    invoke-direct {p0}, Ljavax/microedition/lcdui/Graphics;->implementationError()V

    .line 92
    return-void
.end method

.method public drawSubstring(Ljava/lang/String;IIIII)V
    .locals 1
    .parameter "str"
    .parameter "offset"
    .parameter "len"
    .parameter "x"
    .parameter "y"
    .parameter "anchor"

    .prologue
    .line 95
    add-int v0, p2, p3

    invoke-virtual {p1, p2, v0}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v0

    invoke-virtual {p0, v0, p4, p5, p6}, Ljavax/microedition/lcdui/Graphics;->drawString(Ljava/lang/String;III)V

    .line 96
    return-void
.end method

.method public fillArc(IIIIII)V
    .locals 0
    .parameter "x"
    .parameter "y"
    .parameter "width"
    .parameter "height"
    .parameter "startAngle"
    .parameter "arcAngle"

    .prologue
    .line 99
    invoke-direct {p0}, Ljavax/microedition/lcdui/Graphics;->implementationError()V

    .line 100
    return-void
.end method

.method public fillRect(IIII)V
    .locals 0
    .parameter "x"
    .parameter "y"
    .parameter "width"
    .parameter "height"

    .prologue
    .line 103
    invoke-direct {p0}, Ljavax/microedition/lcdui/Graphics;->implementationError()V

    .line 104
    return-void
.end method

.method public fillRoundRect(IIIIII)V
    .locals 0
    .parameter "x"
    .parameter "y"
    .parameter "width"
    .parameter "height"
    .parameter "arcWidth"
    .parameter "arcHeight"

    .prologue
    .line 107
    invoke-direct {p0}, Ljavax/microedition/lcdui/Graphics;->implementationError()V

    .line 108
    return-void
.end method

.method public fillTriangle(IIIIII)V
    .locals 0
    .parameter "x1"
    .parameter "y1"
    .parameter "x2"
    .parameter "y2"
    .parameter "x3"
    .parameter "y3"

    .prologue
    .line 225
    invoke-direct {p0}, Ljavax/microedition/lcdui/Graphics;->implementationError()V

    .line 226
    return-void
.end method

.method public getBlueComponent()I
    .locals 1

    .prologue
    .line 111
    invoke-virtual {p0}, Ljavax/microedition/lcdui/Graphics;->getColor()I

    move-result v0

    and-int/lit16 v0, v0, 0xff

    return v0
.end method

.method public getClipHeight()I
    .locals 1

    .prologue
    .line 115
    invoke-direct {p0}, Ljavax/microedition/lcdui/Graphics;->implementationError()V

    .line 117
    const/4 v0, -0x1

    return v0
.end method

.method public getClipWidth()I
    .locals 1

    .prologue
    .line 121
    invoke-direct {p0}, Ljavax/microedition/lcdui/Graphics;->implementationError()V

    .line 123
    const/4 v0, -0x1

    return v0
.end method

.method public getClipX()I
    .locals 1

    .prologue
    .line 127
    invoke-direct {p0}, Ljavax/microedition/lcdui/Graphics;->implementationError()V

    .line 129
    const/4 v0, -0x1

    return v0
.end method

.method public getClipY()I
    .locals 1

    .prologue
    .line 133
    invoke-direct {p0}, Ljavax/microedition/lcdui/Graphics;->implementationError()V

    .line 135
    const/4 v0, -0x1

    return v0
.end method

.method public getColor()I
    .locals 1

    .prologue
    .line 139
    invoke-direct {p0}, Ljavax/microedition/lcdui/Graphics;->implementationError()V

    .line 141
    const/4 v0, -0x1

    return v0
.end method

.method public getDisplayColor(I)I
    .locals 1
    .parameter "color"

    .prologue
    .line 234
    invoke-direct {p0}, Ljavax/microedition/lcdui/Graphics;->implementationError()V

    .line 236
    const/4 v0, -0x1

    return v0
.end method

.method public getFont()Ljavax/microedition/lcdui/Font;
    .locals 1

    .prologue
    .line 145
    invoke-direct {p0}, Ljavax/microedition/lcdui/Graphics;->implementationError()V

    .line 147
    const/4 v0, 0x0

    return-object v0
.end method

.method public getGrayScale()I
    .locals 2

    .prologue
    .line 151
    invoke-virtual {p0}, Ljavax/microedition/lcdui/Graphics;->getRedComponent()I

    move-result v0

    invoke-virtual {p0}, Ljavax/microedition/lcdui/Graphics;->getGreenComponent()I

    move-result v1

    add-int/2addr v0, v1

    invoke-virtual {p0}, Ljavax/microedition/lcdui/Graphics;->getBlueComponent()I

    move-result v1

    add-int/2addr v0, v1

    div-int/lit8 v0, v0, 0x3

    return v0
.end method

.method public getGreenComponent()I
    .locals 1

    .prologue
    .line 155
    invoke-virtual {p0}, Ljavax/microedition/lcdui/Graphics;->getColor()I

    move-result v0

    shr-int/lit8 v0, v0, 0x8

    and-int/lit16 v0, v0, 0xff

    return v0
.end method

.method public getRedComponent()I
    .locals 1

    .prologue
    .line 159
    invoke-virtual {p0}, Ljavax/microedition/lcdui/Graphics;->getColor()I

    move-result v0

    shr-int/lit8 v0, v0, 0x10

    and-int/lit16 v0, v0, 0xff

    return v0
.end method

.method public getStrokeStyle()I
    .locals 1

    .prologue
    .line 163
    iget v0, p0, Ljavax/microedition/lcdui/Graphics;->strokeStyle:I

    return v0
.end method

.method public getTranslateX()I
    .locals 1

    .prologue
    .line 167
    iget v0, p0, Ljavax/microedition/lcdui/Graphics;->translateX:I

    return v0
.end method

.method public getTranslateY()I
    .locals 1

    .prologue
    .line 171
    iget v0, p0, Ljavax/microedition/lcdui/Graphics;->translateY:I

    return v0
.end method

.method public setClip(IIII)V
    .locals 0
    .parameter "x"
    .parameter "y"
    .parameter "width"
    .parameter "height"

    .prologue
    .line 175
    invoke-direct {p0}, Ljavax/microedition/lcdui/Graphics;->implementationError()V

    .line 176
    return-void
.end method

.method public setColor(I)V
    .locals 0
    .parameter "RGB"

    .prologue
    .line 179
    invoke-direct {p0}, Ljavax/microedition/lcdui/Graphics;->implementationError()V

    .line 180
    return-void
.end method

.method public setColor(III)V
    .locals 2
    .parameter "red"
    .parameter "green"
    .parameter "blue"

    .prologue
    .line 183
    move v0, p3

    .line 184
    .local v0, rgb:I
    shl-int/lit8 v1, p2, 0x8

    add-int/2addr v0, v1

    .line 185
    shl-int/lit8 v1, p1, 0x10

    add-int/2addr v0, v1

    .line 186
    invoke-virtual {p0, v0}, Ljavax/microedition/lcdui/Graphics;->setColor(I)V

    .line 187
    return-void
.end method

.method public setFont(Ljavax/microedition/lcdui/Font;)V
    .locals 0
    .parameter "font"

    .prologue
    .line 190
    invoke-direct {p0}, Ljavax/microedition/lcdui/Graphics;->implementationError()V

    .line 191
    return-void
.end method

.method public setGrayScale(I)V
    .locals 1
    .parameter "grey"

    .prologue
    .line 194
    if-ltz p1, :cond_0

    const/16 v0, 0xff

    if-le p1, v0, :cond_1

    .line 195
    :cond_0
    new-instance v0, Ljava/lang/IllegalArgumentException;

    invoke-direct {v0}, Ljava/lang/IllegalArgumentException;-><init>()V

    throw v0

    .line 197
    :cond_1
    invoke-virtual {p0, p1, p1, p1}, Ljavax/microedition/lcdui/Graphics;->setColor(III)V

    .line 198
    return-void
.end method

.method public setStrokeStyle(I)V
    .locals 1
    .parameter "style"

    .prologue
    .line 201
    if-eqz p1, :cond_0

    const/4 v0, 0x1

    if-eq p1, v0, :cond_0

    .line 202
    new-instance v0, Ljava/lang/IllegalArgumentException;

    invoke-direct {v0}, Ljava/lang/IllegalArgumentException;-><init>()V

    throw v0

    .line 204
    :cond_0
    iput p1, p0, Ljavax/microedition/lcdui/Graphics;->strokeStyle:I

    .line 205
    return-void
.end method

.method public translate(II)V
    .locals 1
    .parameter "x"
    .parameter "y"

    .prologue
    .line 208
    iget v0, p0, Ljavax/microedition/lcdui/Graphics;->translateX:I

    add-int/2addr v0, p1

    iput v0, p0, Ljavax/microedition/lcdui/Graphics;->translateX:I

    .line 209
    iget v0, p0, Ljavax/microedition/lcdui/Graphics;->translateY:I

    add-int/2addr v0, p2

    iput v0, p0, Ljavax/microedition/lcdui/Graphics;->translateY:I

    .line 210
    return-void
.end method
